From: Daniel Kiper Date: Wed, 4 Dec 2013 12:26:37 +0000 (+0100) Subject: x86: fix early boot command line parsing X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~5822^2~1 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=dc37e0bfffc673f4bdce1d69ad86098bfb0ab531;p=xen.git x86: fix early boot command line parsing There is no reliable way to encode NUL character as a character so encode it as a number. Read: http://sourceware.org/binutils/docs/as/Characters.html. Octal and hex encoding do not work on at least one system (GNU assembler version 2.22 (x86_64-linux-gnu) using BFD version (GNU Binutils for Debian) 2.22). Without this fix e.g. no-real-mode option at the end of xen.gz command line is not detected. Signed-off-by: Daniel Kiper Reviewed-by: Andrew Cooper Acked-by: Keir Fraser --- diff --git a/xen/arch/x86/boot/cmdline.S b/xen/arch/x86/boot/cmdline.S index 05ffb941e5..e1f45951a9 100644 --- a/xen/arch/x86/boot/cmdline.S +++ b/xen/arch/x86/boot/cmdline.S @@ -138,7 +138,8 @@ call .Lstrlen add $4,%esp xadd %eax,%ebx - cmpb $'\0',(%ebx) + /* NUL check (as $'\0' == 0x30 in GAS) */ + cmpb $0,(%ebx) je 3f cmpb $' ',(%ebx) je 3f